package com.zzs.gmshop.web;

import com.opensymphony.xwork2.ActionSupport;
import com.zzs.gmshop.entity.Book;
import com.zzs.gmshop.manager.BookManager;
import com.zzs.gmshop.utils.PagerModel;

public class BookAction extends ActionSupport {

	private static final long serialVersionUID = 1L;
	
	private BookManager bookManager;

	private PagerModel pager;
	
	private String id;
	
	private Book book;
	
	public String execute() {
		pager = bookManager.findAllBook();
		return "SUCCESS";
	}
	
	public String findBook() {
		book = bookManager.findBook(id);
		return "find";
	}

	public PagerModel getPager() {
		return pager;
	}

	public void setPager(PagerModel pager) {
		this.pager = pager;
	}

	public void setBookManager(BookManager bookManager) {
		this.bookManager = bookManager;
	}

	public Book getBook() {
		return book;
	}

	public void setBook(Book book) {
		this.book = book;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}
	
	
}
